.tetris-container {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 0;
  padding: 15px 50px;
  box-sizing: border-box;
  font-family: 'Arial', sans-serif;
  max-width: 1000px;
  margin: 0 auto;
  background: linear-gradient(135deg, #20203a, #191930);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  justify-content: center;
  align-items: start;

  #tetris-game {
    border: none;
    border-radius: 0;
    background-color: transparent;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    overflow: visible;
    margin: 0 auto;
    width: 100%;
    max-width: 360px;
    min-height: 600px;
    canvas {
      display: block;
      margin: 0 auto;
    }
  }

  .left-column, 
  .right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #8be9fd #2a2a3a;
    justify-content: flex-start;
    
    &::-webkit-scrollbar {
      width: 8px;
    }
    
    &::-webkit-scrollbar-track {
      background: #2a2a3a;
      border-radius: 4px;
    }
    
    &::-webkit-scrollbar-thumb {
      background-color: #8be9fd;
      border-radius: 4px;
    }
  }

  .score-panel,
  .next-piece-panel,
  .controls,
  .instructions {
    padding: 20px;
    background: linear-gradient(145deg, #2a2a3a, #333345);
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    
    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    }
  }

  h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
    color: #8be9fd;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(139, 233, 253, 0.3);
    padding-bottom: 8px;
    text-align: center;
  }

  #next-piece-preview {
    margin: 15px auto;
    width: 90px;
    height: 90px;
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .score-panel {
    background: linear-gradient(145deg, #483d8b, #32327c);
    
    h3 {
      color: #fff;
      border-bottom: 2px solid rgba(255, 255, 255, 0.2);
      margin-bottom: 10px;
      font-size: 18px;
    }
  }

  .controls {
    display: flex;
    flex-direction: column;
    gap: 15px;

    button {
      padding: 12px 15px;
      font-size: 16px;
      font-weight: 700;
      cursor: pointer;
      color: white;
      border: none;
      border-radius: 8px;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      transition: all 0.2s ease;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
      
      &:hover:not(:disabled) {
        box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
      }

      &:active:not(:disabled) {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      }

      &:disabled {
        background: linear-gradient(145deg, #666, #555) !important;
        opacity: 0.6;
        cursor: not-allowed;
      }
    }
  }

  .instructions {
    background: linear-gradient(145deg, #5a5070, #453a5a);
    
    h3 {
      margin-bottom: 10px;
    }
    
    p {
      margin: 8px 0;
      display: flex;
      align-items: center;
      font-size: 15px;
      color: #f1fa8c;
      padding: 4px 0;
    }
    
    p:before {
      content: "•";
      margin-right: 8px;
      color: #ff79c6;
      font-size: 20px;
    }
  }

  .next-piece-panel {
    background: linear-gradient(145deg, #3a506b, #2c3e50);
  }

  .game-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    justify-content: center;
  }

  .score-panel {
    .stat-item {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
      padding: 5px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      
      &:last-child {
        margin-bottom: 0;
        border-bottom: none;
      }
      
      .stat-label {
        font-weight: 500;
      }
      
      .stat-value {
        font-weight: 700;
        color: #50fa7b;
        font-size: 18px;
      }
    }
  }
  
  .start-btn {
    background: linear-gradient(145deg, #3CB371, #2E8B57) !important;
    
    &:hover:not(:disabled) {
      background: linear-gradient(145deg, #2E8B57, #3CB371) !important;
    }
  }
  
  .pause-btn {
    background: linear-gradient(145deg, #F4A460, #E5954E) !important;
    
    &:hover:not(:disabled) {
      background: linear-gradient(145deg, #E5954E, #F4A460) !important;
    }
  }
}

@media (max-width: 1024px) {
  .tetris-container {
    grid-template-columns: 1fr 2fr;
    
    .right-column {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
    }
  }
}

@media (max-width: 768px) {
  .tetris-container {
    grid-template-columns: 1fr;
    padding: 15px;
    
    .left-column,
    .right-column {
      grid-column: 1;
    }
    
    .right-column {
      display: flex;
      flex-direction: column;
    }
    
    .game-title {
      .controls-mobile {
        display: flex;
        gap: 10px;
        
        button {
          padding: 8px 10px;
          font-size: 14px;
          font-weight: 700;
          text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
        }
      }
    }
    
    .controls {
      display: none;
    }
  }
}
